/** 
 * Project Name:tinysql 
 * File Name:HavingConditionSymbol.java 
 * Package Name:com.wdy.golden.tinysql.plus 
 * Date:2021年5月6日上午10:22:00 
 * 
*/  
package com.wdy.golden.tinysql.plus;

import com.wdy.golden.tinysql.enmus.SqlSeparateType;

/** 
 * ClassName:HavingConditionSymbol <br/> 
 * Function: TODO ADD FUNCTION. <br/> 
 * Reason:   TODO ADD REASON. <br/> 
 * Date:     2021年5月6日 上午10:22:00 <br/> 
 * @author   DongYe_Wu 
 * @version
 * @see       
 */
public enum HavingConditionSymbol {

	GT(" > %s ", 1),
	LT(" < %s ", 2),
	GET(" >= %s ", 3),
	LET(" <= %s ", 4),
	EQ(" = %s ", 5),
	NEQ(" <> %s", 6),
	;

	public String name;
	public int index;

	private HavingConditionSymbol(String name, int index) {
		this.name = name;
		this.index = index;
	}

	public static String getName(int index) {
		for (SqlSeparateType c : SqlSeparateType.values()) {
			if (c.getIndex() == index) {
				return c.name;
			}
		}
		return null;
	}
	
	public String getName() {
		return name;
	}

	public int getIndex() {
		return index;
	}

}
